package org.example.game.biweekly.game152;

import java.util.ArrayList;
import java.util.List;

public class Solution001 {

    public static void main(String[] args) {
        System.out.println("hello");
        System.out.println("=A1+B2".split("\\+")[0].substring(1).toLowerCase());
        System.out.println(new Solution001().totalNumbers(new int[]{1,2,3,4}));
    }

    public int totalNumbers(int[] digits) {
        int length = digits.length;
        List<Integer> res = new ArrayList<>();
        int num = 0;
        for (int i = 0; i < length; i++) {
            for (int j = 0; j < length; j++) {
                for (int k = 0; k < length; k++) {
                    if(i == j || i == k || j==k){
                        continue;
                    }
                    if(digits[i] == 0) continue;
                    if(digits[k] % 2 != 0) continue;
                    num = digits[i] * 100 + digits[j] * 10 + digits[k];
                    if(res.contains(num)){
                        continue;
                    }
                    res.add(num);
                }
            }
        }
        return res.size();
    }
    
}
